package app.view.component 
{
	import flash.display.MovieClip;
	import flash.events.Event;
	
	/**
	 * ...
	 * @author hungconcon
	 */
	[Embed(source="../../../../lib/background.swf", symbol="Background")]
	public class Background extends MovieClip {
		public function Background(){
			addEventListener(Event.ADDED_TO_STAGE, onInital);
		}
		public function onInital(evt:Event):void {
			stage.addEventListener( Event.RESIZE, onResize );	
			//visible = false;
			onResize(evt);
		}
		public function onResize(evt:Event):void {
			//width = (width > stage.stageWidth)?width:stage.stageWidth;
			//height = (height > stage.stageHeight)?height:stage.stageHeight;
			
			x = Math.round((stage.stageWidth - width) / 2);
			y = Math.round((stage.stageHeight - height) / 2);
		}
	}
}